package g360.WebXpdlValidation;

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class BackEnd extends HttpServlet
{
    ServletContext context;

    public void init(ServletConfig config) throws ServletException
    {
        super.init(config);
        this.context = config.getServletContext();
        this.context.log("Xpdl Validator Back End Started.");
    }

    public void doGet(HttpServletRequest request,
                      HttpServletResponse response) throws IOException
    {
        response.setContentType("text/xml");
        response.setHeader("Cache-Control", "no-cache");
        PrintWriter writer = response.getWriter();
        writer.write("<message>I heard you.</message>");
    }
}